Skip to content

refactor(openspec): consolidate specs by capability and device class - #260

Open
cleithner-comcast wants to merge 4 commits into
cleith/dev/migrateSpecsV4from
cleith/dev/consolidateSpecs
Open

refactor(openspec): consolidate specs by capability and device class#260
cleithner-comcast wants to merge 4 commits into
cleith/dev/migrateSpecsV4from
cleith/dev/consolidateSpecs

Conversation

@cleithner-comcast

Copy link
Copy Markdown
Contributor

Reorganize openspec/specs/ from 35 fragmented, inconsistently-scoped specs down to 20 coherent capability specs, and encode a governance rule so the spec count stays bounded as SBMD drivers scale to 100+.

  • config.yaml: specs are per capability or per device class, never per driver; new device support is a .sbmd.js file governed by the SBMD schema validator
  • SBMD framework: sbmd-runtime, sbmd-mappers, sbmd-endpoint-resolution, sbmd-claiming
  • device classes: device-class-light, device-class-thermostat, device-class-environmental-sensor (reframed from per-driver specs)
  • cross-cutting: agent-skills, release-process, matter-testing

Requirement meaning is preserved for consolidations; device-class reframes drop driver-file and integration-test requirements now owned by the .sbmd.js files, the SBMD validator, and the matter-testing spec. All 20 specs pass openspec validate --specs --strict.


Stack created with GitHub Stacks CLIGive Feedback 💬

Reorganize openspec/specs/ from 35 fragmented, inconsistently-scoped specs down to 20 coherent capability specs, and encode a governance rule so the spec count stays bounded as SBMD drivers scale to 100+.

- config.yaml: specs are per capability or per device class, never per driver; new device support is a .sbmd.js file governed by the SBMD schema validator
- SBMD framework: sbmd-runtime, sbmd-mappers, sbmd-endpoint-resolution, sbmd-claiming
- device classes: device-class-light, device-class-thermostat, device-class-environmental-sensor (reframed from per-driver specs)
- cross-cutting: agent-skills, release-process, matter-testing

Requirement meaning is preserved for consolidations; device-class reframes drop driver-file and integration-test requirements now owned by the .sbmd.js files, the SBMD validator, and the matter-testing spec. All 20 specs pass openspec validate --specs --strict.
Copilot AI lite review requested due to automatic review settings August 4, 2026 20:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reorganizes OpenSpec documentation to keep the spec set bounded as SBMD drivers scale, consolidating multiple fragmented specs into a smaller number of capability- and device-class–scoped specs and encoding the organization rule in openspec/config.yaml.

Changes:

  • Add a governance rule: OpenSpec specs are per capability or per device class (never per concrete SBMD driver); new device support is added as .sbmd.js files governed by the SBMD schema validator.
  • Consolidate SBMD framework and cross-cutting specs (runtime, mappers, endpoint resolution, claiming; agent skills; release process; Matter testing) and delete the consumed source specs.
  • Reframe per-driver specs into device-class contracts (light, thermostat, environmentalSensor) and add a new OpenSpec change bundle documenting the consolidation.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
openspec/config.yaml Adds spec-organization governance rules to prevent per-driver spec sprawl.
openspec/specs/sbmd-runtime/spec.md Consolidates SBMD runtime/system + execution-limit requirements into a single runtime spec.
openspec/specs/sbmd-mappers/spec.md Consolidates mapper prerequisite gating + seedFrom requirements.
openspec/specs/sbmd-endpoint-resolution/spec.md Renames/extends endpoint resolution spec to include cluster-based fallback and binding rule.
openspec/specs/sbmd-claiming/spec.md Renames/clarifies vendor/product claiming spec under SBMD naming.
openspec/specs/device-class-light/spec.md Introduces a device-class contract spec for light.
openspec/specs/device-class-thermostat/spec.md Reframes thermostat spec as a device-class contract and mapping description.
openspec/specs/device-class-environmental-sensor/spec.md Introduces a device-class contract spec for environmentalSensor.
openspec/specs/matter-testing/spec.md Consolidates Matter test infrastructure + virtual devices + sideband client + fixtures/tests into one spec.
openspec/specs/release-process/spec.md Consolidates release-workflow + changelog-generation requirements into one spec.
openspec/specs/agent-skills/spec.md Consolidates individual agent-skill specs into one governing spec (note: contains an SBMD-validation mismatch raised in review).
openspec/specs/temperature-humidity-sbmd-drivers/spec.md Deleted (content reframed into device-class-environmental-sensor / testing moved to matter-testing).
openspec/specs/sbmd-v4-light-driver/spec.md Deleted (content reframed into device-class-light).
openspec/specs/sbmd-system/spec.md Deleted (content moved into sbmd-runtime).
openspec/specs/sbmd-seed-from-attribute/spec.md Deleted (content moved into sbmd-mappers).
openspec/specs/sbmd-script-execution-limits/spec.md Deleted (content moved into sbmd-runtime).
openspec/specs/python-sideband-client/spec.md Deleted (content moved into matter-testing).
openspec/specs/matterjs-virtual-device-framework/spec.md Deleted (content moved into matter-testing).
openspec/specs/matterjs-door-lock-device/spec.md Deleted (content moved into matter-testing).
openspec/specs/matter-thermostat-testing/spec.md Deleted (content moved into matter-testing).
openspec/specs/matter-test-infrastructure/spec.md Deleted (content moved into matter-testing).
openspec/specs/endpoint-cluster-fallback/spec.md Deleted (content moved into sbmd-endpoint-resolution).
openspec/specs/changelog-generation/spec.md Deleted (content moved into release-process).
openspec/specs/agent-skill-build/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-debug/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-format-code/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-integration-tests/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-matter-devices/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-unit-tests/spec.md Deleted (content moved into agent-skills).
openspec/specs/agent-skill-validate-sbmd/spec.md Deleted (content moved into agent-skills).
openspec/changes/consolidate-specs/.openspec.yaml Adds change metadata for the consolidation change bundle.
openspec/changes/consolidate-specs/proposal.md Proposal documenting rationale, consolidation map, and non-goals.
openspec/changes/consolidate-specs/design.md Design doc capturing decisions/trade-offs for the consolidation/governance model.
openspec/changes/consolidate-specs/tasks.md Task checklist for governance + consolidation + validation steps.

Comment thread openspec/specs/agent-skills/spec.md
Propagate the camera work from main up the stack after merging it into the base branch:

- fold the new 'volatile resource mode' requirement from sbmd-v4-runtime into the consolidated sbmd-runtime spec
- rename camera-session-lifecycle -> device-class-camera (Model A: camera is device type 0x0142)
- keep webrtc-signaling-endpoint (protocol endpoint, separable by design) and camera-stream-reference-command (reference-app feature) as distinct capabilities rather than folding them, per one-capability-per-spec
- update config.yaml governance rule to reference scripts/ci/validate_sbmd_specs.py (main consolidated the SBMD validators and removed validate_sbmd_v4_specs.py)

All 23 specs pass openspec validate --specs --strict.
Copilot AI review requested due to automatic review settings August 6, 2026 16:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated no new comments.

Suppressed comments (3)

openspec/changes/consolidate-specs/proposal.md:7

  • The proposal references scripts/ci/validate_sbmd_v4_specs.py, but other updated docs in this PR reference scripts/ci/validate_sbmd_specs.py as the validator (e.g., openspec/config.yaml). Please standardize on the correct validator script name/path across all docs to avoid sending readers to a non-existent or outdated tool.
- **Governance rule (the durable fix):** encode in `openspec/config.yaml` that OpenSpec specs are authored per capability or per device class — never per concrete driver. A new supported device is added as a `.sbmd.js` driver file governed by the SBMD schema validator (`scripts/ci/validate_sbmd_v4_specs.py`), not as a new spec. This keeps the spec count bounded (~15–25) as drivers scale to 100+.

openspec/changes/consolidate-specs/tasks.md:10

  • The task list claims several spec renames/creations (e.g., sbmd-claiming, sbmd-mappers, sbmd-endpoint-resolution, release-process), but the diffs shown keep the original spec directory IDs (e.g., openspec/specs/vendor-product-claiming/, openspec/specs/sbmd-resource-prerequisites/, openspec/specs/device-type-endpoint-resolution/, openspec/specs/release-workflow/). If the intent is to rename spec IDs, the directories should be renamed to match; otherwise the tasks/proposal should be adjusted to reflect that only the titles changed.
- [x] 2.1 Create `sbmd-runtime` from `sbmd-system` + `sbmd-v4-runtime` + `sbmd-script-execution-limits`
- [x] 2.2 Create `sbmd-mappers` from `sbmd-resource-prerequisites` + `sbmd-seed-from-attribute`
- [x] 2.3 Create `sbmd-endpoint-resolution` from `device-type-endpoint-resolution` + `endpoint-cluster-fallback`
- [x] 2.4 Rename `vendor-product-claiming` to `sbmd-claiming`

openspec/changes/consolidate-specs/tasks.md:21

  • The task list claims several spec renames/creations (e.g., sbmd-claiming, sbmd-mappers, sbmd-endpoint-resolution, release-process), but the diffs shown keep the original spec directory IDs (e.g., openspec/specs/vendor-product-claiming/, openspec/specs/sbmd-resource-prerequisites/, openspec/specs/device-type-endpoint-resolution/, openspec/specs/release-workflow/). If the intent is to rename spec IDs, the directories should be renamed to match; otherwise the tasks/proposal should be adjusted to reflect that only the titles changed.
- [x] 4.2 Create `release-process` from `changelog-generation` + `release-workflow`

…e v4 skill

Addresses PR #260 review: the consolidated agent-skills spec described the old YAML-based SBMD validation and stub generation, but the actual validate-sbmd skill (updated on main) validates v4 .sbmd.js driver files via scripts/ci/validate_sbmd_specs.py against sbmd-spec-schema.json. Update the spec-validation and file-location requirements and drop the obsolete stub-generation requirement.
Copilot AI review requested due to automatic review settings August 10, 2026 13:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 35 out of 35 changed files in this pull request and generated no new comments.

Suppressed comments (4)

openspec/changes/consolidate-specs/design.md:12

  • The diagram still refers to validate_sbmd_v4_specs.py, which does not exist in this repo (the script is validate_sbmd_specs.py).
   governed by    │ validate_sbmd_v4_specs.py + JSON schema   ← not OpenSpec

openspec/changes/consolidate-specs/proposal.md:7

  • The proposal references scripts/ci/validate_sbmd_v4_specs.py, but the repository validator script is scripts/ci/validate_sbmd_specs.py (and no validate_sbmd_v4_specs.py exists). This should be corrected to avoid pointing contributors at a non-existent tool.
- **Governance rule (the durable fix):** encode in `openspec/config.yaml` that OpenSpec specs are authored per capability or per device class — never per concrete driver. A new supported device is added as a `.sbmd.js` driver file governed by the SBMD schema validator (`scripts/ci/validate_sbmd_v4_specs.py`), not as a new spec. This keeps the spec count bounded (~15–25) as drivers scale to 100+.

openspec/changes/consolidate-specs/design.md:7

  • This design doc references scripts/ci/validate_sbmd_v4_specs.py, but the validator script in the repo is scripts/ci/validate_sbmd_specs.py. The current filename will misdirect readers.

This issue also appears on line 12 of the same file.

- Concrete drivers are already validated by `scripts/ci/validate_sbmd_v4_specs.py` against a JSON schema at build time — a mechanism independent of OpenSpec.

openspec/specs/matter-testing/spec.md:53

  • This requirement states “chip-tool is no longer used in any capacity”, but the repository still ships chip-tool in the Docker image and other docs/skills describe using it. Consider scoping this statement to the integration-test harness (cluster classes + device interactor) to avoid a cross-spec contradiction.
The entire `testing/mocks/devices/matter/clusters/` directory SHALL be removed. This includes `MatterCluster` (base class), `OnOffCluster`, `LevelControlCluster`, and `ColorControlCluster`. The `_register_cluster()` method, `get_cluster()` method, and `_cluster_classes` attribute SHALL be removed from `MatterDevice`. `device_interactor.py` (`ChipToolDeviceInteractor`) SHALL be deleted entirely — chip-tool is no longer used in any capacity. The `_set_interactor()` method, `_interactor` attribute, and `_chip_tool_node_id` attribute SHALL be removed from `MatterDevice`. The `device_interactor` plugin registration SHALL be removed from `conftest.py`. Tests SHALL interact with device state through the side-band interface (`device.sideband`) and commission devices directly through the Barton API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants